package com.example.demo.mapper;

import com.example.demo.model.CompanyInfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CompanyInfoMapper {
    @Select("SELECT * FROM company_info WHERE company_name = #{companyName}")
    List<CompanyInfo> getCompanyInfoByCompanyName(String companyName);

    @Update("UPDATE company_info SET job_name=#{jobName}, fl=#{fl}, address=#{address}, salary=#{salary}, " +
            "employment_experience=#{employmentExperience}, position_description=#{positionDescription}, " +
            "contact_name=#{contactName}, contact_phone=#{contactPhone} WHERE job_id=#{jobId}")
    void updateCompanyInfo(CompanyInfo companyInfo);
}